import {
  get,
  post,
  //postForm,
  del
} from '@/utils/http'
// const packageName = `/agriculture_develop_webservice/screen`

/**
 * 登录
 */
export function login(params) {
  return post(`/pc/sysUser/login`, params)
}
/**
 * 首页
 */
//获取当前控制模式
export function getControlModel(params) {
  return get(`/home/getControlModel`, params)
}
//获取在线检测数据
export function getGhAttrList(params) {
  return get(`/home/getGhAttrList`, params)
}
//获取温室调控任务执行日志列表
export function getGhLogList(params) {
  return get(`/home/getGhLogList`, params)
}
//获取温室调控任务执行日志列表
export function saveControlModel(params) {
  return post(`/home/saveControlModel`, params)
}
//获取系统日志列表
export function getSysLogList(params) {
  return get(`/sysLog/getSysLogList`, params)
}
//获取温室调控任务执行日志列表
export function getGhLogListAlarm(params) {
  return get(`/ghLog/getGhLogList`, params)
}
//获取温室调控时间
export function getGhTime(params) {
  return get(`/ghTime/getGhTime`, params)
}
//获取温室调控时间列表
export function getGhTimeList(params) {
  return get(`/ghTime/getGhTimeList`, params)
}
//删除温室调控时间
export function delGhTime(params) {
  return del(`/ghTime/delGhTime`, params)
}
//保存温室调控时间
export function saveGhTime(params) {
  return post(`/ghTime/saveGhTime`, params)
}

/***
 * 温室调控属性
 */
//获取温室调控属性设置
export function getGhAttrSetting(params) {
  return get(`/ghAttrSetting/getGhAttrSetting`, params)
}
//获取温室调控属性设置列表
export function getGhAttrSettingList(params) {
  return get(`/ghAttrSetting/getGhAttrSettingList`, params)
}
//获取全部调控属性列表
export function getGhAttrSettings(params) {
  return get(`/ghAttrSetting/getGhAttrSettings`, params)
}
//获取全部调控属性列表
export function getGhAttrs(params) {
  return get(`/ghAttrSetting/getGhAttrs`, params)
}
//删除温室调控时间
export function delGhAttrSetting(params) {
  return del(`/ghAttrSetting/delGhAttrSetting`, params)
}
//保存温室调控时间
// export function saveGhAttrSetting(params) {
//   return post(`/ghAttrSetting/saveGhAttrSetting`, params)
// }

/***
 * 温室调控属性设置
 */

//获取全部调控属性列表
export function getGhAttrSettingPrecondition(params) {
  return get(`/ghAttrSettingPrecondition/getGhAttrSettingPrecondition`, params)
}
//获取全部调控属性列表
export function getGhAttrSettingPreconditionList(params) {
  return get(`/ghAttrSettingPrecondition/getGhAttrSettingPreconditionList`, params)
}
//删除温室调控属性设置前置条件
export function delGhAttrSettingPrecondition(params) {
  return del(`/ghAttrSettingPrecondition/delGhAttrSettingPrecondition`, params)
}
//保存温室调控属性设置前置条件
export function saveGhAttrSettingPrecondition(params) {
  return post(`/ghAttrSettingPrecondition/saveGhAttrSettingPrecondition`, params)
}
/***
 * 温室调控执行任务
 */

//获取温室调控执行任务
export function getGhTask(params) {
  return get(`/ghTask/getGhTask`, params)
}
//获取温室调控执行任务列表
export function getGhTaskList(params) {
  return get(`/ghTask/getGhTaskList`, params)
}
//删除温室调控执行任务
export function delGhTask(params) {
  return del(`/ghTask/delGhTask`, params)
}
//保存温室调控属性设置前置条件
export function saveGhTask(params) {
  return post(`/ghTask/saveGhTask`, params)
}
//获取调控开关设备属性列表
export function getGhSwitchs(params) {
  return get(`/ghSwitch/getGhSwitchs`, params)
}
//获取全部温室调控时间
export function getGhTimes(params) {
  return get(`/ghTime/getGhTimes`, params)
}

export function getGrowthModelDecisionScheduleComponets(params) {
  return get(`/pc/growthModelDecisionSchedule/getGrowthModelDecisionScheduleComponets`, params)
}
export function getGrowthModelDecisionSchedules(params) {
  return get(`/pc/growthModelDecisionSchedule/getGrowthModelDecisionSchedules`, params)
}
export function saveGrowthModelDecisionSchedule(params) {
  return post(`/pc/growthModelDecisionSchedule/saveGrowthModelDecisionSchedule`, params)
}
// 系统用户
export function getSysUserList(params) {
  return get(`/pc/sysUser/getSysUserList`, params)
}
export function delSysUser(params) {
  return del(`/pc/sysUser/delSysUser`, params)
}
export function saveSysUser(params) {
  return post(`/pc/sysUser/saveSysUser`, params)
}
export function exportGhLogList(params) {
  return get(`/ghLog/exportGhLogList`, params)
}
export function getSwitchList(params) {
  return get(`/pc/objDeviceSwitch/getSwitchList`, params)
}
export function getAttributesBySwtichId(params) {
  return get(`/pc/objDeviceSwitch/getAttributesBySwtichId`, params)
}
export function getGhAttrGroupList(params) {
  return get(`/ghAttrSetting/getGhAttrGroupList`, params)
}
export function saveGhAttrSetting(params) {
  return post(`/ghAttrSetting/saveGhAttrSetting`, params)
}
export function delGhAttrGroup(params) {
  return del(`/ghAttrSetting/delGhAttrGroup`, params)
}
export function getGhAttrGroups(params) {
  return get(`/ghAttrGroup/getGhAttrGroups`, params)
}
export function openOrClose(params) {
  return post(`/ghTask/openOrClose`, params)
}
export function confirmPasswd(params) {
  return post(`/home/confirmPasswd`, params)
}
